Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Chapter Lists

A chapter list provides a set of named entry points into a movie, allowing the user to jump to a preselected point in the movie from a convenient pop-up list.

The movie controller automatically recognizes a chapter list and will create a pop-up list from it. When the user makes a selection from the pop-up, the controller will jump to the appropriate point in the movie. Note: If the movie is sized so that the controller is too narrow to display the chapter names, the pop-up list will not appear.

To create a chapter list, you must create a text track with one sample for each chapter. The display time for each sample corresponds to the point in the movie that marks the beginning of that chapter. You must also create a track reference of type `chap' from an enabled track of the movie to the text track. It is the `chap' track reference that makes the text track into a chapter list. The track containing the reference can be of any type (audio, video, mpeg, etc.), but it must be enabled for the chapter list to be recognized.

Given an enabled track myVideoTrack , use AddTrackReference to create the chapter reference:

    AddTrackReference( myVideoTrack, theTextTrack,
        kTrackReferenceChapterList,
        &addedIndex );

kTrackReferenceChapterList is defined in Movies.h. It has the value 'chap' .

The text track which constitutes the chapter list does not need to be enabled, and normally is not. If it is enabled, the text track will be displayed as part of the movie, just like any other text track, in addition to functioning as a chapter list.

If more than one enabled track includes a `chap' track reference, QuickTime will use the first chapter list that it finds.


© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |